#!C:/Perl/bin/perl.exe -w
#
#

use strict;

while ( my $file = glob '*.*' ) {
	next unless $file =~ /(?:pm|tt2)$/;
	my $tmp = int( rand time ) . '.tmp';
	`iconv -f cp1251 -t utf-8 $file > $tmp`;
	rename($tmp, $file) || die $!;
	print "$file, $tmp\n";
}

